//TSC+ 
//Original Hack by Noxid, extras added by Serri

//Custom hacks used: <MS4, <MIM, <PHY, optimized <TRA, <VAR, <BUY, <CMN, <LRX, <NAM
//Commands removed: <INP, <CRE, <SIL, <CIL, <XX1, second <FAC, <CAT

offset 4225cb

#define
TSCFile=[4A5AD8]
TSCLoc=[4A5AE0]

{<AE+=2b45413c
{<AM+=2b4d413c
{<AM-=2d4d413c
{<AMJ=4a4d413c
{<ANP=504e413c
{<BBP=5042423c
{<BOA=414f423c
{<BSL=4c53423c
{<BUY=5955423c
{<CIL=4c49433c
{<CLO=4f4c433c
{<CLR=524c433c
{<CMN=4e4d433c
{<CMP=504d433c
{<CMU=554d433c
{<CNP=504e433c
{<CPS=5350433c
{<CRE=4552433c
{<CSS=5353433c
{<DNA=414e443c
{<DNP=504e443c
{<ECJ=4a43453c
{<END=444e453c
{<EQ+=2b51453c
{<EQ-=2d51453c
{<ESC=4353453c
{<EVE=4556453c
{<FAC=4341463c
{<FAI=4941463c
{<FAO=4F41463c
{<FL+=2b4c463c
{<FL-=2d4c463c
{<FLA=414c463c
{<FLJ=4a4c463c
{<FMU=554D463c
{<FNJ=4a4e463c
{<FOB=424f463c
{<FOM=4d4f463c
{<FON=4e4f463c
{<FRE=4552463c
{<GIT=5449473c
{<HMC=434d483c
{<INI=494e493c
{<IT+=2b54493c
{<IT-=2d54493c
{<ITJ=4a54493c
{<KEY=59454b3c
{<LDP=50444c3c
{<LI+=2b494c3c
{<LRX=58524C3C
{<MIM=4d494d3c
{<ML+=2b4c4d3c
{<MLP=504c4d3c
{<MM0=304d4d3c
{<MNA=414e4d3c
{<MNP=504e4d3c
{<MOV=564F4d3c
{<MP+=2b504d3c
{<MPJ=4a404d3c
{<MS2=32534d3c
{<MS3=33534d3c
{<MS4=34534d3c
{<MSG=47534d3c
{<MYB=42594d3c
{<MYD=44594d3c
{<NAM=4D414E3C
{<NCJ=4a434e3c
{<NOD=444f4e3c
{<NUM=4d554e3c
{<OTR=52544f3c
{<PHY=5948503C
{<PRI=4952503c
{<PS+=2b53503c
{<QUA=4155513c
{<RND=444e523c
{<RMU=554d523c
{<SAT=5441533c
{<SEL=4c45533c
{<SIL=4c49533c
{<SK+=2b4b533c
{<SK-=2d4b533c
{<SKJ=4a4b533c
{<SLP=504c533c
{<SMC=434d533c
{<SMP=504d533c
{<SNP=504e533c
{<SOU=554f533c
{<SPS=5350533c
{<SSS=5353533c
{<STC=4354533c
{<SVP=5056533c
{<TAM=4d41543c
{<TRA=4152543c
{<TUR=5255543c
{<UNI=494e553c
{<UNJ=4a4e553c
{<VAJ=4a41563c
{<VAO=4f41563c
{<VAR=5241563c
{<VAZ=5a41563c
{<WAI=4941573c
{<WAS=5341573c
{<XX1=3158583c
{<YNJ=4a4e593c
{<ZAM=4d415a3c

ParserEnd=4225cb
ascii2num=421900

mov[4a5adc],al=data A2 DC 5A 4A 00
movzxeax,byte[49E638]=data 0F B6 05 38 E6 49 00
mov[49E638],al=data A2 38 E6 49 00
movbyte[4a5adc],al=data A2 DC 5A 4A 00
movsxecx,byte[4a5add]=data 0F BE 0D DD 5A 4A 00
mov[4a5add],cl=data 88 0D DD 5A 4A 00
mov[4a5b08],al=data A2 08 5B 4A 00
mov[49e184],al=data A2 84 E1 49 00

//BUY 
money_owned = 499c5c

//CMN 
movsxecx,word[49e586] = data 0f bf 0d 86 e5 49 00
movzxedx,[ecx+eax] = data 0f b6 14 08
movsxeax,word[49e586] = data 0f bf 05 86 e5 49 00
movbyte[eax+ecx],dl = data 88 14 01

#enddefine

call 48be51

cmp dword [ebp-2c], 0
jnz 425571
mov eax, tscfile
add eax, tscloc
movsx edx, byte [eax]
cmp edx, 3c
jnz 4252aC


cmp dword [eax], {<END
jnz :END<END
xor eax, eax
mov[4a5adc],al
movzxeax,byte[49e638]
and eax, fffffffE
mov[49E638],al
mov ecx, [49E1E8]
or ecx, 3
mov [49E1E8], ecx
xor eax, eax
mov [4a5b0c], eax
mov [4a5add], eax
inc eax
mov [ebp-2c], eax
jmp ParserEnd
:END<END

cmp dword [eax], {<LI+
jnz :END<LI+
mov edx, tscloc
add edx, 4
push edx
call ascii2num
add esp, 4
push eax
call 419C60
add esp, 4
add tscloc, 8
jmp parserend
:END<LI+

cmp dword [eax], {<ML+
jnz :END<LI-
mov eax, tscloc
add eax, 4
push eax
call Ascii2num
add esp, 4
push eax
call 419CB0
add esp, 4
add tscloc, 8
jmp parserend
:END<LI-

cmp dword [eax], {<AE+
jnz :END<AE+
call 402090
add tscloc, 4
jmp parserend
:END<AE+

cmp dword [eax], {<IT+
jnz :END<IT+
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-C], eax
push 1
push 26
call 420640
add esp, 8
mov ecx, [ebp-C]
push ecx
call 4012D0
add esp, 4
add tscloc, 8
jmp parserend
:END<IT+

cmp dword [eax], {<IT-
jnz :END<IT-
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 401330
add esp, 4
add tscloc, 8
jmp parserend
:END<IT-

cmp dword [eax], {<EQ+
jnz :END<EQ+
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push 1
push eax
call 416C70
add esp, 8
add tscloc, 8
jmp parserend
:END<EQ+

cmp dword [eax], {<EQ-
jnz :END<EQ-
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push 0
push eax
call 416C70
add esp, 8
add tscloc, 8
jmp parserend
:END<EQ-

cmp dword [eax], {<AM+
jnz :END<AM+
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-4], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
mov [ebp-0C], eax
mov [4a5b34], eax
mov eax, [ebp-24]
mov [4a5b38], eax
push 1
push 26
call 420640
add esp, 8
mov ecx, [ebp-c]
push ecx
mov eax, [ebp-4]
push eax
call 401050
add esp, 8
add tscloc, 0D
jmp parserend
:END<AM+

cmp dword [eax], {<AM-
jnz :END<AM-
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 401160
add esp, 4
add tscloc, 8
jmp parserend
:END<AM-

cmp dword [eax], {<ZAM
jnz :END<ZAM
call 419b50
add tscloc, 4
jmp parserend
:END<ZAM

cmp dword [eax], {<TAM
jnz :END<TAM
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
mov [ebp-8], eax
mov eax,tscloc
add eax, 0E
push eax
call ascii2num
add esp, 4
mov [ebp-24], eax
push eax
mov eax, [ebp-8]
push eax
mov eax, [ebp-C]
push eax
call 401220
add esp, 0C
add tscloc, 12
jmp parserend
:END<TAM

cmp dword [eax], {<PS+
jnz :END<PS+
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax,9
push eax
call ascii2num
add esp, 4
push eax
push [ebp-c]
call 41D630
add esp, 8
add tscloc, 0D
jmp parserend
:END<PS+

cmp dword [eax], {<MP+
jnz :END<MP+
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 414b40
add esp, 4
add tscloc, 8
jmp parserend
:END<MP+

cmp dword [eax], {<UNI
jnz :END<UNI
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 416C40
add esp, 4
add tscloc, 8
jmp parserend
:END<UNI

cmp dword [eax], {<STC
jnz :END<STC
call 41a5d0
add tscloc, 4
jmp parserend
:END<STC

cmp dword [eax], {<MOV
jnz :END<MOV
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
shl eax, 9
shl eax, 4
push eax
mov eax, [ebp-C]
shl eax, 9
shl eax, 4
push eax
call 416AC0
add esp, 8
add tscloc, 0D
jmp parserend
:END<MOV

cmp dword [eax], {<HMC
jnz :END<HMC
push 0
call 415220
add esp, 4
add tscloc, 4
jmp parserend
:END<HMC

cmp dword [eax], {<SMC
jnz :END<SMC
push 1
call 415220
add esp, 4
add tscloc, 4
jmp parserend
:END<SMC

cmp dword [eax], {<FL+
jnz :END<FL+
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 40e890
add esp, 4
add tscloc, 8
jmp parserend
:END<FL+

cmp dword [eax], {<FL-
jnz :END<FL-
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 40e8e0
add esp, 4
add tscloc, 8
jmp parserend
:END<FL-

cmp dword [eax], {<SK+
jnz :END<SK+
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 40e970
add esp, 4
add tscloc, 8
jmp parserend
:END<SK+

cmp dword [eax], {<SK-
jnz :END<SK-
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 40e9C0
add esp, 4
add tscloc, 8
jmp parserend
:END<SK-

cmp dword [eax], {<KEY
jnz :END<KEY
mov eax, [49E1E8]
and eax, FFFFFFFD
or eax, 1
mov [49E1E8], eax
xor eax, eax
mov [49E644], eax
mov [49E6C8], eax
add tscloc, 4
jmp parserend
:END<KEY

cmp dword [eax], {<PRI
jnz :END<PRI
mov ecx, [49e1e8]
and ecx, FFFFFFFC
mov [49E1E8], ecx
xor eax, eax
mov [49E6C8], eax
add tscloc, 4
jmp parserend
:END<PRI

cmp dword [eax], {<FRE
jnz :END<FRE
mov eax, [49E1E8]
or eax, 3
mov [49E1E8], eax
add tscloc, 4
jmp parserend
:END<FRE

cmp dword [eax], {<NOD
jnz :END<NOD
xor eax, eax
mov al, 2
mov byte [4a5adc], al
add tscloc, 4
mov [ebp-2C], 1
jmp parserend
:END<NOD

cmp dword [eax], {<CLR
jnz :END<CLR
call 421E90
add tscloc, 4
jmp parserend
:END<CLR

//<MSG variant optimization by Thomas Xin
cmp dword [eax], {<MSG
jnz :END<MSG
call 421e90
or byte [4a5add], 3
and byte [4a5add], cf
test byte [4a5add], 40
jz :dingus
or byte [4a5add], 10
:dingus
add tscloc, 4
push 1
pop dword [ebp-2c]
jmp parserend
:END<MSG

cmp dword [eax], {<MS2
jnz :END<MS2
call 421e90
or byte [4a5add], 21
and byte [4a5add], ed
test byte [4a5add], 40
jz :dingleberries
or byte [4a5add], 10
:dingleberries
and dword [4a5b0c], 0
add tscloc, 4
push 1
pop dword [ebp-2c]
jmp parserend
:END<MS2

cmp dword [eax], {<MS3
jnz :END<MS3
call 421e90
or byte [4a5add], 23
and byte [4a5add], ef
test byte [4a5add], 40
jz :miccsisgay
or byte [4a5add], 10
:miccsisgay
add tscloc, 4
push 1
pop dword [ebp-2c]
jmp parserend
:END<MS3

//<MS4 by Serri/Thomas Xin
//<MS4, used the same as <MSG, but invisible like <MS2.
cmp dword [eax], {<MS4
jnz :END<MS4
call 421e90
or byte [4a5add], 01
and byte [4a5add], cd
test byte [4a5add], 40
jz :serrialsogay
or byte [4a5add], 10
:serrialsogay
and dword [4a5b0c], 0
add tscloc, 4
push 1
pop dword [ebp-2c]
jmp parserend
:END<MS4

cmp dword [eax], {<WAI
jnz :END<WAI
xor eax, eax
mov al, 4
mov byte [4a5adc], al
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [4a5b00], eax
add tscloc, 8
mov [ebp-2c], 1
jmp parserend
:END<WAI

cmp dword [eax], {<WAS
jnz :END<WAS
xor eax, eax
mov al, 7
mov byte [4a5adc], al
add tscloc, 4
mov [ebp-2c], 1
jmp parserend
:END<WAS

cmp dword [eax], {<TUR
jnz :END<TUR
add tscloc, 4
movsx ecx, byte [4a5add]
or ecx, 10
mov byte [4a5add], cl
jmp parserend
:END<TUR

cmp dword [eax], {<SAT
jnz :END<SAT
add tscloc, 4
movsx ecx, byte [4a5add]
or ecx, 40
mov byte [4a5add], cl
jmp parserend
:END<SAT

cmp dword [eax], {<CLO
jnz :END<CLO
movsx ecx, byte [4a5add]
and ecx, FFFFFFCC
mov byte [4a5add], cl
add tscloc, 4
jmp parserend
:END<CLO

cmp dword [eax], {<EVE
jnz :END<EVE
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 421AF0
add esp, 4
jmp parserend
:END<EVE

cmp dword [eax], {<YNJ
jnz :END<YNJ
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [4a5b04], eax
add tscloc, 8
xor eax, eax
mov al, 6
mov byte [4a5adc], al
push 1
push 5
call 420640
add esp, 8
xor eax, eax
mov [4a5afc], eax
mov byte [4a5b08], al
inc eax
mov [ebp-2c], eax
jmp parserend
:END<YNJ

cmp dword [eax], {<FLJ
jnz :END<FLJ
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
mov [ebp-24], eax
mov eax, [ebp-c]
push eax
call 40e930
add esp, 4
test eax, eax
je :NoFlag
mov eax, [ebp-24]
push eax
call 421AF0
add esp, 4
jmp :FLJLabel
:NoFlag
add tscloc, 0D
:FLJLabel
jmp parserend
:END<FLJ

cmp dword [eax], {<SKJ
jnz :END<SKJ
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-C], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
mov [ebp-24], eax
push [ebp-c]
call 40EA10
add esp, 4
test eax, eax
je :NoSkip
push [ebp-24]
call 421AF0
add esp, 4
jmp :SKJLabel
:NoSkip
add tscloc, 0d
:SKJLabel
jmp parserend
:END<SKJ

cmp dword [eax], {<ITJ
jnz :END<ITJ
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
mov [ebp-24], eax
push [ebp-c]
call 401F20
add esp, 4
test eax, eax
je :NoItem
push [ebp-24]
call 421AF0
add esp, 4
jmp :ITJLabel
:NoItem
add tscloc, 0D
:ITJLabel
jmp parserend
:END<ITJ

cmp dword [eax], {<AMJ
jnz :END<AMJ
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
mov [ebp-24],eax
push [ebp-c]
call 401F60
add esp, 4
test eax, eax
je :NoArm
push [ebp-24]
call 421AF0
add esp, 4
jmp :AMJLabel
:NoArm
add tscloc, 0D
:AMJLabel
jmp parserend
:END<AMJ

cmp dword [eax], {<UNJ
jnz :END<UNJ
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
mov [ebp-24], eax
call 416B60
cmp eax, [ebp-c]
jnz :NotUni
push [ebp-24]
call 421AF0
add esp, 4
jmp :UNJLabel
:NotUni
add tscloc, 0D
:UNJLabel
jmp parserend
:END<UNJ

cmp dword [eax], {<ECJ
jnz :END<ECJ
mov ecx, tscloc
add ecx, 4
push ecx
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
mov [ebp-24],eax
push [ebp-c]
call 4704F0
add esp, 4
test eax, eax
je :NoEC
push [ebp-24]
call 421AF0
add esp, 4
jmp :ECJLabel
:NoEC
add tscloc, 0D
:ECJLabel
jmp parserend
:END<ECJ

cmp dword [eax], {<NCJ
jnz :END<NCJ
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
mov [ebp-24], eax
push [ebp-c]
call 470490
add esp, 4
test eax, eax
je :NoNPC
push [ebp-24]
call 421AF0
add esp, 4
jmp :NCJLabel
:NoNPC
add tscloc, 0D
:NCJLabel
jmp parserend
:END<NCJ

cmp dword [eax], {<MPJ
jnz :END<MPJ
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
call 414B00
test eax, eax
je :NoMap
push [ebp-c]
call 421AF0
add esp, 4
jmp :YesMap
:NoMap
add tscloc, 8
:Yesmap
jmp parserend
:END<MPJ

cmp dword [eax], {<SSS
jnz :END<SSS
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
push 1
call 416CC0
add esp, 8
add tscloc, 8
jmp parserend
:END<SSS

cmp dword [eax], {<CSS
jnz :END<CSS
call 416D40
add tscloc, 4
jmp parserend
:END<CSS

cmp dword [eax], {<SPS
jnz :END<SPS
mov eax, [ebp-c]
push eax
push 2
call 416CC0
add esp, 8
add tscloc, 4
jmp parserend
:END<SPS

cmp dword [eax], {<CPS
jnz :END<CPS
call 416D40
add tscloc, 4
jmp parserend
:END<CPS

cmp dword [eax], {<QUA
jnz :END<QUA
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 40F310
add esp, 4
add tscloc, 8
jmp parserend
:END<QUA

cmp dword [eax], {<FLA
jnz :END<FLA
push 2
push 0
push 0
call 40EA70
add esp, 0C
add tscloc, 4
jmp parserend
:END<FLA

cmp dword [eax], {<FAI
jnz :END<FAI
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 40DF50
add esp, 4
xor eax, eax
mov al, 5
mov byte [4a5adc], al
add tscloc, 8
mov [ebp-2c], 1
jmp parserend
:END<FAI

cmp dword [eax], {<FAO
jnz :END<FAO
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 40DEC0
add esp, 4
xor eax, eax
mov al, 5
mov byte [4a5adc], al
add tscloc, 8
mov [ebp-2c], 1
jmp parserend
:END<FAO

cmp dword [eax], {<MNA
jnz :END<MNA
call 414310
add tscloc, 4
jmp parserend
:END<MNA

cmp dword [eax], {<FOM
jnz :END<FOM
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 40F220
add esp, 4
add tscloc, 8
jmp parserend
:END<FOM

cmp dword [eax], {<FON
jnz :END<FON
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
push eax
push [ebp-c]
call 40F250
add esp, 8
add tscloc, 0D
jmp parserend
:END<FON

cmp dword [eax], {<FOB
jnz :END<FOB
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
push eax
push [ebp-c]
call 40F2D0
add esp, 8
add tscloc, 0D
jmp parserend
:END<FOB

cmp dword [eax], {<SOU
jnz :END<SOU
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push 1
push eax
call 420640
add esp, 8
add tscloc, 8
jmp parserend
:END<SOU

cmp dword [eax], {<CMU
jnz :END<CMU
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 420EE0
add esp, 4
add tscloc, 8
jmp parserend
:END<CMU

cmp dword [eax], {<FMU
jnz :END<FMU
call 41C880
add tscloc, 4
jmp parserend
:END<FMU

cmp dword [eax], {<RMU
jnz :END<RMU
call 420F50
add tscloc, 4
jmp parserend
:END<RMU

cmp dword [eax], {<MLP
jnz :END<MLP
add tscloc, 4
mov [ebp-2c], 1
call 414640
mov [ebp-C0], eax
test eax, eax
jz :MLPWasZero
cmp [ebp-C0], 2
je :MLPWas2
jmp :MLPNeither
:MLPWasZero
Xor eax, eax
jmp 425765
:MLPWas2
mov eax, 2
jmp 425765
:MLPNeither
jmp parserend
:END<MLP

cmp dword [eax], {<SLP
jnz :END<SLP
mov dword [ebp-2c], 1
lea eax, [ebp-24]
push eax
call 41Da00
add esp, 4
mov [ebp-C4], eax
cmp eax, 0
je :SLPWasZero
cmp dword [ebp-C4], 2
je :SLPWas2
jmp :SLPWasNeither
:SLPWasZero
xor eax, eax
jmp 425765
:SLPWas2
mov eax, 2
jmp 425765
:SLPWasNeither
push [ebp-24]
call 421AF0
add esp, 4
mov edx, [49E1E8]
and edx, FFFFFFFC
mov [49E1E8], edx
jmp parserend
:END<SLP

cmp dword [eax], {<DNP
jnz :END<DNP
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 470250
add esp, 4
add tscloc, 8
jmp parserend
:END<DNP

cmp dword [eax], {<DNA
jnz :END<DNA
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push 1
push eax
call 4702D0
add esp, 8
add tscloc, 8
jmp parserend
:END<DNA

cmp dword [eax], {<BOA
jnz :END<BOA
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 472940
add esp, 4
add tscloc, 8
jmp parserend
:END<BOA

cmp dword [eax], {<CNP
jnz :END<CNP
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
mov [ebp-8], eax
mov eax, tscloc
add eax, 0E
push eax
call ascii2num
add esp, 4
push eax
push [ebp-8]
push [ebp-c]
call 46FAb0
add esp, 0C
add tscloc, 12
jmp parserend
:END<CNP

cmp dword [eax], {<ANP
jnz :END<ANP
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
mov [ebp-8], eax
mov eax, tscloc
add eax, 0E
push eax
call ascii2num
add esp, 4
push eax
push [ebp-8]
push [ebp-c]
call 46FF90
add esp, 0C
add tscloc, 12
jmp parserend
:END<ANP

cmp dword [eax], {<SNP
jnz :END<SNP
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-4], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 0E
push eax
call ascii2num
add esp, 4
mov [ebp-8], eax
mov eax, tscloc
add eax, 13
push eax
call ascii2num
add esp, 4
mov [ebp-24], eax
push 100
push 0
push [ebp-24]
push 0
push 0
mov edx, [ebp-8]
shl edx, 9
shl edx, 4
push edx
mov eax, [ebp-c]
shl eax, 9
shl eax, 4
push eax
push [ebp-4]
call 46EFD0
add esp, 20
add tscloc, 17
jmp parserend
:END<SNP

cmp dword [eax], {<MNP
jnz :END<MNP
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-4], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 0E
push eax
call ascii2num
add esp, 4
mov [ebp-8], eax
mov eax, tscloc
add eax, 13
push eax
call ascii2num
add esp, 4
mov [ebp-24], eax
push eax
mov edx, [ebp-8]
shl edx, 9
shl edx, 4
push edx
mov eax, [ebp-c]
shl eax, 9
shl eax, 4
push eax
push [ebp-4]
call 470060
add esp, 10
add tscloc, 17
jmp parserend
:END<MNP

cmp dword [eax], {<SMP
jnz :END<SMP
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
push eax
push [ebp-c]
call 413A20
add esp, 8
add tscloc, 0D
jmp parserend
:END<SMP

cmp dword [eax], {<CMP
jnz :END<CMP
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-c], eax
mov eax, tscloc
add eax, 9
push eax
call ascii2num
add esp, 4
mov [ebp-8], eax
mov eax, tscloc
add eax, 0E
push eax
call ascii2num
add esp, 4
push eax
push [ebp-8]
push [ebp-c]
call 413A60
add esp, 0C
add tscloc, 12
jmp parserend
:END<CMP

cmp dword [eax], {<BSL
jnz :END<BSL
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-24], eax
test eax, eax
jz :BSLWasZero
push [ebp-24]
call 47b460
add esp, 4
jmp :BSLNotZero
:BSLWasZero
call 47b500
:BSLNotZero
add tscloc, 8
jmp parserend
:END<BSL

cmp dword [eax], {<MYD
jnz :END<MYD
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov DirectionFaced, eax
add esp, 4
add tscloc, 8
jmp parserend
:END<MYD

cmp dword [eax], {<MYB
jnz :END<MYB
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 470150
add esp, 4
add tscloc, 8
jmp parserend
:END<MYB

cmp dword [eax], {<MM0
jnz :END<MM0
call 416B50
add tscloc, 4
jmp parserend
:END<MM0

cmp dword [eax], {<INI
jnz :END<INI
mov ecx, [49E458]
push ecx
call 41D550
add esp, 4
add tscloc, 4
jmp parserend
:END<INI

cmp dword [eax], {<SVP
jnz :END<SVP
push 0
call 41D040
add esp, 4
add tscloc, 4
jmp parserend
:END<SVP

cmp dword [eax], {<LDP
jnz :END<LDP
push 0
call 41D260
add esp, 4
test eax, eax
jnz :LDPNonZero
mov ecx, [49E458]
push ecx
call 41D550
add esp, 4
:LDPNonZero
jmp parserend
:END<LDP

cmp dword [eax], {<FAC
jnz :END<FAC
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-24], eax
cmp [4a5b0C], eax
je :FaceSame
mov eax, [ebp-24]
mov [4a5b0C], eax
mov [4a5b10], 6800
:FaceSame
add tscloc, 8
jmp parserend
:END<FAC

cmp dword [eax], {<GIT
jnz :END<GIT
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
mov [ebp-24], eax
mov [4a5b14], eax
mov [4a5b18], 80
add tscloc, 8
jmp parserend
:END<GIT

cmp dword [eax], {<NUM
jnz :END<NUM
mov eax, tscloc
add eax, 4
push eax
call ascii2num
add esp, 4
push eax
call 421d10
add esp, 4
add tscloc, 8
jmp parserend
:END<NUM

//PLACE OPTIONAL COMMANDS HERE



//END OPTIONAL COMMANDS

cmp dword [eax], {<ESC
jnz :END<ESC
mov eax, 2
jmp 425765
:END<ESC
jmp 425244

:cmnCode
push ebp
mov ebp,esp
mov eax, [49e480]
movsxecx,word[49e586]
imul ecx, [ebp+8]
movzxedx,[ecx+eax]
mov edx, [ebp+10]
movsxeax,word[49e586]
imul eax, [ebp+0c]
mov ecx,[49e480]
add ecx,[ebp+8]
movbyte[eax+ecx],dl
pop ebp
retn